<?php

namespace Home\Controller;
use Common\Controller\FirstendController;

class AdvertController extends FirstendController {

    public function tgo() {
        $id = I('id',0, 'intval');
        $url = M('Ad')->where(array('id'=>$id))->getField('url');
        !$url && $this->_404();
        redirect($url);
    }
}